const {getOrders,getOneOrder,updateOrders,deleteOrders} = require('../dao/ordersDao');

module.exports.getOrders = async function(p){
        if(p.currentPage){
            return await getOrders(p);
        }
}
module.exports.getOneOrder = async function(p){
    return await getOneOrder(p);
}
module.exports.updateOrders = async function(p){
    return await updateOrders(p);
}
module.exports.deleteOrders = async function(p){
    let data= await deleteOrders(p);    
    if(data.deletedCount===1){
        return true;
    }
    return false;
}